﻿DECLARE @Var_PatientId VARCHAR(100)
SET @Var_PatientId = @PatientId_In

SELECT Id AS registerId
      ,DeptName AS deptName
      ,ReservationDate AS regTime
      ,RegFee AS price
      ,CASE WHEN CommitDate IS NULL THEN '1'
       ELSE '2' END AS registerStatus
FROM dbo.AP_ReservationSheet(NOLOCK)
WHERE PatientId = @Var_PatientId